#ifndef COMPILERSET_H
#define COMPILERSET_H
//编译器结构体
struct CompilerSet
{
    QString compilerName;
    QString compileArg;
    QString linkArg;
    QStringList binList;
    QStringList libList;
    QStringList cIncludeList;
    QStringList cppIncludeList;
    QString gccFile;
    QString gppFile;
    QString makeFile;
    QString gdbFile;
    QString windresFile;
    QString gprofFile;
    bool compileArgCheckBoxState=false;
    bool linkArgCheckBoxState=false;
    bool staticLinkCheckBoxState=false;
    bool warningAllCheckBoxState=false;
    bool warningExtraCheckBoxState=false;
    int modeIndex=3;

    //定义<<操作符的作用，用于写入setting.ini文件
    friend QDataStream & operator << (QDataStream &arch, const CompilerSet & object)
    {
        arch << object.compilerName;
        arch << object.compileArg;
        arch << object.linkArg;
        arch << object.binList;
        arch << object.libList;
        arch << object.cIncludeList;
        arch << object.cppIncludeList;
        arch << object.gccFile;
        arch << object.gppFile;
        arch << object.makeFile;
        arch << object.gdbFile;
        arch << object.windresFile;
        arch << object.gprofFile;
        arch << object.compileArgCheckBoxState;
        arch << object.linkArgCheckBoxState;
        arch << object.staticLinkCheckBoxState;
        arch << object.warningAllCheckBoxState;
        arch << object.warningExtraCheckBoxState;
        arch << object.modeIndex;

        return arch;
    }
    //定义>>操作符的作用，用于写入setting.ini文件
    friend QDataStream & operator >> (QDataStream &arch, CompilerSet & object)
    {
        arch >> object.compilerName;
        arch >> object.compileArg;
        arch >> object.linkArg;
        arch >> object.binList;
        arch >> object.libList;
        arch >> object.cIncludeList;
        arch >> object.cppIncludeList;
        arch >> object.gccFile;
        arch >> object.gppFile;
        arch >> object.makeFile;
        arch >> object.gdbFile;
        arch >> object.windresFile;
        arch >> object.gprofFile;
        arch >> object.compileArgCheckBoxState;
        arch >> object.linkArgCheckBoxState;
        arch >> object.staticLinkCheckBoxState;
        arch >> object.warningAllCheckBoxState;
        arch >> object.warningExtraCheckBoxState;
        arch >> object.modeIndex;

        return arch;
    }
};
#endif
